﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AuditConfigure.aspx.cs" Inherits="WMS6.Web.Administration.AuditConfigure" meta:resourcekey="Page" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>AuditConfigure</title>
    <link href="../style/zh/1/css.css" type="text/css" rel="Stylesheet" id="mycss" />
    <link href="../Css/style.css" type="text/css" rel="stylesheet" />
    <script src="../Js/jquery.js" type="text/javascript"></script>
    <script src="../Js/jquery.simplemodal.js" type="text/javascript"></script>
    <script src="../Js/util.js" id="js" type="text/javascript"></script>
    <script src="../Js/InitPage.js" type="text/javascript"></script>    
    <script src="../Js/checkbox.js" type="text/javascript"></script>    
    <script type="text/javascript">
        //初始化页面
        window.onload = function(){
            initEditNewPage();
        }
        
        function newCreateWh()
        {
            var from = document.getElementById("hdnFrom").value;
            window.location.href = "AuditConfigure.aspx?from="+escape(from);
            return false;
        }
        ///3checkboxid
        function CheckBoxClick(obj,id1,id2,id3)
        {
                var value = obj.checked;
                document.getElementById(id1).checked = value;
                
                document.getElementById(id2).checked = value;
                
                document.getElementById(id3).checked = value;
        }
        
        function AuditselectAll(chkbox,gv)
        {    
            var state = chkbox.checked;
                      
             var TargetBaseControl = document.getElementById(gv);  
             var TargetChildControl = chkbox; 
             
             var Inputs = TargetBaseControl.getElementsByTagName("input"); 
             for(var i=0;i<Inputs.length;i++)
             {
                if(Inputs[i].type == 'checkbox' && Inputs[i].id.indexOf("chbIsPrimary") <0)
                {
                    Inputs[i].checked = state;               
                      GridViewAllCheckBoxClick(Inputs[i].parentElement.parentElement.id,state);
                   
                 }
             }
        }
   </script>     
</head>
<body>
    <form id="F1211" runat="server">
    <div>
    
            <asp:ScriptManager ID="ScriptManager1" runat="server" />
            
            <div id="div_top">
                <table>
                    <tr>
                        <td valign="bottom"><asp:Label ID="lblAllocateRule" runat="server" 
                                CssClass="label_header" Text="审计设置" meta:resourcekey="lblAllocateRule"></asp:Label></td>
                        <td><asp:Button ID="btnGoBack" runat="server" CssClass="button" Enabled="False" 
                                Text="<%$Resources:ButtonResource,btnGoBack%>" OnClick="btnGoBack_Click"   /></td>
                        <td><asp:Button ID="btnSave" runat="server" CssClass="button" Enabled="False" 
                                Text="<%$Resources:ButtonResource,btnSave%>" AccessKey="s" OnClick="btnSave_Click" 
                                 /></td>
                    </tr>
                </table>
            </div>
            
             <asp:UpdatePanel ID="up1" runat="server">
                <ContentTemplate>
                    <div>
                        <asp:Label ID="lblMsg" runat="server" CssClass="label_message" 
                            meta:resourcekey="lblMsg"></asp:Label>
                    </div>
                    
                    <div id="div_menu">
                        <div style="float: left; width: 8px;">
                            <div class="tabL" id="divL1"></div>
                        </div>
                        <div style="float:left;" class="tabLabelCont tabCur"  id="divM1">
                            <asp:Label ID="one1" CssClass="hover" runat="server" 
                                meta:resourcekey="one1">审计设置</asp:Label></div>
                        <div style="float: left; margin-right: 2px;">
                            <div class="tabR" id="divR1"></div>
                        </div>       
                    </div>
                    
                    
                    <div id="div_content">
                         <div id="con_one_1" style="display: block;">
                            <table width="720px" style="display: block; margin-top: 10px; margin-left:10px;">
                                <tr>
                                    <td>
                                        <div>
                                            <asp:GridView ID="gvAuditConfigure" runat="server" AutoGenerateColumns="False" 
                                                CssClass="gridview"    DataKeyNames="TableName,ColName,ColType"
                                                onrowdatabound="gvAuditConfigure_RowDataBound"  Width="800px" 
                                                meta:resourcekey="gvAuditConfigure" >
                                            <FooterStyle CssClass="GridViewFooterStyle" />
                                            <RowStyle CssClass="GridViewRowStyle" />
                                            <HeaderStyle CssClass="GridViewHeaderStyle" />
                                            <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />  
                                                <Columns>
                                                    <asp:BoundField HeaderText="序号" FooterText="序号" 
                                                        meta:resourcekey="No"><ItemStyle CssClass="GridViewRowWidth_40" /></asp:BoundField>
                                                    
                                                    <asp:TemplateField meta:resourcekey="TemplateField">
                                                        <HeaderTemplate>
                                                            <asp:CheckBox ID="CheckBox1" runat="server" 
                                                                onclick="AuditselectAll(this,'gvAuditConfigure');" 
                                                                meta:resourcekey="CheckBox1" /> 
                                                        </HeaderTemplate>
                                                        <ItemTemplate>
                                                            <asp:CheckBox ID="chbSelect" runat="server" 
                                                                meta:resourcekey="chbSelect" />
                                                        </ItemTemplate>
                                                        <FooterTemplate>
                                                            <asp:CheckBox ID="CheckBox2" runat="server" 
                                                                onclick="AuditselectAll(this,'gvAuditConfigure');" 
                                                                meta:resourcekey="CheckBox2" /> 
                                                        </FooterTemplate>
                                                        <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40"/>
                                                        <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40"/>
                                                    </asp:TemplateField>     
                                                    
                                                    
                                                    <asp:BoundField DataField="TableName"  HeaderText="表名" FooterText="表名"  
                                                        SortExpression="TableName" meta:resourcekey="TableName" ><ItemStyle CssClass="GridViewRowWidth_100" /></asp:BoundField>
                                                    <asp:BoundField DataField="ColName"  HeaderText="列名" FooterText="列名"  
                                                        SortExpression="ColName" meta:resourcekey="ColName" ><ItemStyle CssClass="GridViewRowWidth_100" /></asp:BoundField>
                                                    
                                                   <asp:TemplateField meta:resourcekey="IsPrimaryHead">
                                                        <HeaderTemplate>
                                                            <asp:Label ID="lblIsPrimaryHead" runat="server" Text="主键" 
                                                                meta:resourcekey="lblIsPrimaryHead"></asp:Label>
                                                        </HeaderTemplate>
                                                        <ItemTemplate>
                                                            <asp:CheckBox ID="chbIsPrimary" runat="server" Enabled="False" 
                                                                ToolTip=<%# Eval("IsPrimary") %> meta:resourcekey="chbIsPrimary" />
                                                        </ItemTemplate>
                                                        <FooterTemplate>
                                                            <asp:Label ID="lblIsPrimaryFooter" runat="server" Text="主键" 
                                                                meta:resourcekey="lblIsPrimaryFooter"></asp:Label>
                                                        </FooterTemplate>
                                                        <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40"/>
                                                        <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40"/>
                                                    </asp:TemplateField> 
                                                   
                                                   
                                                    
                                                    <asp:BoundField DataField="ColType"  HeaderText="类型" FooterText="类型"  
                                                        SortExpression="ColType" meta:resourcekey="ColType" ><ItemStyle CssClass="GridViewRowWidth_100" /></asp:BoundField>
                                                    <asp:TemplateField meta:resourcekey="ForInsertHead">
                                                        <HeaderTemplate>
                                                            <asp:Label ID="lblForInsertHead" runat="server" Text="新增" 
                                                                meta:resourcekey="lblForInsertHead"></asp:Label>
                                                        </HeaderTemplate>
                                                        <ItemTemplate>
                                                            <asp:CheckBox ID="chbForInsert" runat="server" ToolTip=<%# Eval("ForInsert") %> 
                                                                meta:resourcekey="chbForInsert" />
                                                        </ItemTemplate>
                                                        <FooterTemplate>
                                                            <asp:Label ID="lblForInsertFooter" runat="server" Text="更新" 
                                                                meta:resourcekey="lblForInsertFooter"></asp:Label>
                                                        </FooterTemplate>
                                                        <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40"/>
                                                        <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40"/>
                                                    </asp:TemplateField>
                                                    
                                                    
                                                    <asp:TemplateField meta:resourcekey="ForUpdateHead">
                                                        <HeaderTemplate>
                                                            <asp:Label ID="lblForUpdateHead" runat="server" Text="更新" 
                                                                meta:resourcekey="lblForUpdateHead"></asp:Label>
                                                        </HeaderTemplate>
                                                        <ItemTemplate>
                                                            <asp:CheckBox ID="chbForUpdate" runat="server" ToolTip=<%# Eval("ForUpdate") %> 
                                                                meta:resourcekey="chbForUpdate" />
                                                        </ItemTemplate>
                                                        <FooterTemplate>
                                                            <asp:Label ID="lblForUpdateFooter" runat="server" Text="更新" 
                                                                meta:resourcekey="lblForUpdateFooter"></asp:Label>
                                                        </FooterTemplate>
                                                        <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40"/>
                                                        <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40"/>
                                                    </asp:TemplateField>
                                                    
                                                    
                                                    <asp:TemplateField meta:resourcekey="ForDeleteHead">
                                                        <HeaderTemplate>
                                                            <asp:Label ID="lblForDeleteHead" runat="server" Text="删除" 
                                                                meta:resourcekey="lblForDeleteHead"></asp:Label>
                                                        </HeaderTemplate>
                                                        <ItemTemplate>
                                                            <asp:CheckBox ID="chbForDelete" runat="server" ToolTip=<%# Eval("ForDelete") %> 
                                                                meta:resourcekey="chbForDelete" />
                                                        </ItemTemplate>
                                                        <FooterTemplate>
                                                            <asp:Label ID="lblForDeleteFooter" runat="server" Text="删除" 
                                                                meta:resourcekey="lblForDeleteFooter"></asp:Label>
                                                        </FooterTemplate>
                                                        <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40"/>
                                                        <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40"/>
                                                    </asp:TemplateField>
                                                    
                                                </Columns>
                                            </asp:GridView>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                         </div>
                    </div>
                    
                </ContentTemplate>
            </asp:UpdatePanel>
    </div>
    <input type="hidden" id="hdnFrom" runat="server" />
    <input type="hidden" id="hdnTableName" runat="server" />
    </form>
</body>
</html>
